package com.jackrain.nea.fc.cp.mapper;

import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;
import org.apache.ibatis.annotations.SelectProvider;
import org.apache.ibatis.jdbc.SQL;

import java.util.HashMap;
import java.util.List;
import java.util.Map;

@Mapper
public interface WmsCSupplierMapper {

    /**
     * @return List
     */
    @Select( "select\n" +
            "a.ECODE as ecode,\n" +
            "a.ENAME as ename,\n" +
            "'VE' as store_nature,\n" +
            "a.ALLNAME AS all_name,\n" +
            "a.ADDRESS as address,\n" +
            "NULL as cp_c_pro,\n" +
            "c.ENAME as cp_c_city,\n" +
            "NULL as cp_c_dist,\n" +
            "a.CONTACTER as linkman,\n" +
            "a.MOBIL as phone,\n" +
            "a.POST as post,\n" +
            "a.EMAIL as email,\n" +
//                            " NULL a.WMSCODE as WMS_STORE_CODE,\n" +
//                            " NULL a.WMSNAME  as WMS_STORE_NAME,\n" +
            "NULL as region_code,\n" +
            "NULL as region_name,\n" +
            "NULL as logistics_batch,\n" +
            "NULL as transport_company,\n" +
            "NULL as passage_days,\n" +
            "a.REMARK as remark,\n" +
            "a.FAX as fax,\n" +
            "80 as recive_status,\n" +
            "NOW() as write_time,\n" +
            "NULL AS recive_time,\n" +
            "NULL AS recive_err_msg,\n" +
            "a.OWNERENAME as owner_ename,\n" +
            "a.OWNERNAME as owner_name,\n" +
            "a.MODIFIERENAME as modifier_ename,\n" +
            "a.MODIFIERNAME as modifier_name,\n" +
            "a.MODIFIEDDATE as modified_date\n" +
            "from CP_C_SUPPLIER a\n" +
            "left join CP_C_REGION c on c.REGIONTYPE='CITY' and a.CP_C_TITY_ID = c.ID WHERE a.ID IN ( #{ids} ) "
    )
    List<HashMap> selectwmssuppliersql(String ids);




}
